import java.util.Date;

import org.jnetpcap.PcapPktBuffer;
import org.jnetpcap.PcapPktHdr;

public class PacketAnalyzer implements Runnable {
	private static int count = 0;
	private int id;
	private PcapPktHdr pkt_header;
	private PcapPktBuffer buffer;

	public PacketAnalyzer(PcapPktHdr pkt_header, PcapPktBuffer buffer) {
		id = count++;
		this.pkt_header = pkt_header;
		this.buffer = buffer;

	}

	public void run() {
		Date timestamp = new Date(pkt_header.getSeconds() * 1000);
		System.out.printf("#%d. %s caplen=%-4d len=%-4d \n", id, timestamp, pkt_header
				.getCaplen(), pkt_header.getLen());
	}
}